<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>创建函数和调用函数</title>
</head>
<body>
<label>
    用户名：
    <input type="text" id="username" value="admin" onblur="showUsername()">
    <button id="button" onclick="showUsername()">按钮</button>
</label>

<script>
    function say(){
        alert("Hello World")
    }
    say();
    function showUsername(){
        let ele = document.getElementById("username");
        let value = ele.value;
        alert(value);
    }

    var sayHello = function (){
        alert("Hello World2");
    }
    sayHello();
</script>


</body>
</html>